<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
  
  <!-- Dette er registreringssiden. Den lagrer det brukerern skriver inn i databasen -->
  <h:head>
    <title>IGNORED</title>
  </h:head>
  <h:body>
    <ui:composition template="/templates/loginLayout.xhtml">
      <ui:define name="content">
          <h2>#{strings.register_h1}</h2>
          <p>#{strings.register_p1}</p>
          <h:form>
              
          <h:panelGrid columns="2">
            <h:outputText value="#{strings.register_id}" rendered="#{registerbean.updating}"  />
            
            
          </h:panelGrid><br />
           
         <h:panelGroup>
            <h:outputText value="#{strings.register_uname}" /><br />
            <h:inputText id="uname" label="#{strings.register_uname}"
                           value="#{registerbean.uname}" required="true" />
            <h:message for="uname" />
         </h:panelGroup> <br /><br />
         
         
        <h:panelGroup>
            <h:outputText value="#{strings.register_pass}" /><br />
            <h:inputSecret id="pass" label="#{strings.register_pass}"
                           value="#{registerbean.pass}" required="true" />
            <h:message for="pass" />
        </h:panelGroup> <br /><br />
        
        <h:panelGroup>
            <h:outputText value="#{strings.register_email}" /><br />
            <h:inputText id="email" label="#{strings.register_email}"
                           value="#{registerbean.email}" required="true" />
            <h:message for="email" />
         </h:panelGroup> <br /><br />
         
        <h:panelGroup>
            <h:outputText value="#{strings.register_usertype}" /><br />
            <h:inputText id="usertype" label="#{strings.register_usertype}"
                           value="#{registerbean.usertype}" required="true" />
            <h:message for="usertype" />
         </h:panelGroup> <br /><br />
        
        <h:commandButton value="#{strings.register_save}"
                           action="#{registerbean.saveRegister}" />
          </h:form>
      </ui:define>
    </ui:composition>
  </h:body>
</html>